package collection.set;

import java.util.concurrent.CopyOnWriteArraySet;

/**
 * @author weim
 * @date 18-8-27
 *
 * 实现底层是 CopyOnWriteArrayList
 *
 * 线程安全
 *
 */
public class MyCopyOnWriteArraySet {

    public static void main(String[] args) {

        CopyOnWriteArraySet set = new CopyOnWriteArraySet();

        set.add("a");
        set.add("e");
        set.add("c");
        set.add("d");
        set.add(null);
        set.add(null);

        System.out.println(set.toString());



    }

}
